
<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" th:href="@{https://getbootstrap.com/docs/4.0/assets/img/favicons/favicon.ico}">

    <title>Floating labels example for Bootstrap</title>

    <link rel="canonical" th:href="@{https://getbootstrap.com/docs/4.0/examples/floating-labels/}">

    <!-- Bootstrap core CSS -->
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link th:href="@{/css/floating-labels.css}" rel="stylesheet">
  </head>

  <body>
    <form class="form-signin" th:action="@{/user/login}">
      <div class="text-center mb-4">
        <img class="mb-4" th:src="@{https://getbootstrap.com/docs/4.0/assets/brand/bootstrap-solid.svg}" alt="" width="72" height="72">
        <h1 class="h3 mb-3 font-weight-normal" th:text="#{login.tip}">Please sign in</h1>
        <!--如果msg不为空显示-->
        <p style="color: #ff0000" th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></p>
      </div>

      <div class="form-label-group">
        <input type="text" id="username" name="username" class="form-control" th:placeholder="#{login.username}" required autofocus>
        <label for="username" th:text="#{login.username}">username</label>
      </div>

      <div class="form-label-group">
        <input type="password" name="password" id="inputPassword" class="form-control" th:placeholder="#{login.password}" required>
        <label for="inputPassword" th:text="#{login.password}">Password</label>
      </div>

      <div class="checkbox mb-3">
        <label>
          <input type="checkbox" value="remember-me" >[[#{login.remember}]]
        </label>
      </div>
      <button class="btn btn-lg btn-primary btn-block" type="submit">[[#{login.btn}]]</button>
      <a class="btn btn-sm" th:href="@{/login.html(l='zh_CN')}">中文</a>
      <a class="btn btn-sm" th:href="@{/login.html(l='en_US')}">English</a><p></p>
      <p class="mt-5 mb-3 text-muted text-center">&copy; 2017-2018</p>
    </form>
  </body>
</html>
